Repository navigation
feat(plugin-form): an undeclared form dialog spreads a field-heavy form to three columns, four in a full dialog - #34645
Merged
objectstack-fleet[bot] merged 5 commits intoNov 17, 2026
Conversation
… three wide when bounded, four in a full dialog Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs Co-authored-by: Claude <noreply@anthropic.com>
…21/12592 dialog pins to it Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs Co-authored-by: Claude <noreply@anthropic.com>
…efault and the dialog's undeclared count Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs Final green head for L1 · 2026-11-17T05:20Z
|
Contributor
Author
|
repo:objectstack#3 · os-support-ai · session_01WGufzhshTXCAmv9KJXRZkB 席位核对 · L1 (seat 3, L1-a) · 2026-11-17T05:22ZL1: ACCEPT Must-fixNone. Should-fixNone. Readings that hold
Notes
|
…alog-width-columns
Contributor
Author
|
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs Landing · area o3-B · 2026-11-17T05:58Z
State change: ready for review + auto-merge (merge queue). Card #34607 closes on merge via |
objectstack-fleet
Bot
deleted the
claude/issue-34607-dialog-width-columns
branch
November 17, 2026 06:20
9 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Yibo Wang · project thread
Fixes #34607
Clause-②: no
Metadata-protocol: none
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs
维护者速读
columns时,不再固定 2 列:字段多(9 个以上)的表单在标准弹窗里排 3 列,在full弹窗里(16 个以上字段)排 4 列;窄屏仍 1 列。分组、对象字段分组同样处理。columns(含1)的照写。回滚即 revert 本 PR。HotCRM 很多表单显式写了columns: 2,所以在去掉这些声明之前 HotCRM 看不到变化(本 PR 不碰 hotcrm)。附件(file / image)在本 PR 里仍占一格:改成独占整行要动共享的WIDE_FIELD_TYPES,会连带改变整页、抽屉和详情布局,与「不改整页表单的现有推断」冲突,席位已把这个问题提交维护者。ui/packages/plugin-form/src/autoLayout.ts的dialogUndeclaredColumns(封顶规则);ui/packages/plugin-form/src/ModalForm.tsx的effectiveModalSize/undeclaredColumns两段(尺寸先算、列数后算,不循环);__tests__/dialogContainerColumns-34607.test.tsx。pnpm --dir ui exec vitest run packages/plugin-form/src/__tests__/dialogContainerColumns-34607.test.tsx,预期 14 个用例全部通过。What changes
A form dialog whose author declared no
columnsdrew every form two per row. It now takes its count fromdialogUndeclaredColumns(fieldCount, modalSize)(new, dialog-only, inautoLayout.ts):inferColumnsof the fields the dialog lays out, at least 2 (the old fixed default, so a form of up to eight fields draws exactly what it drew before);fullone. Measured, not assumed: thexldialog issm:max-w-5xl(64rem) and its@containerscroller padssm:px-6, so the field container is 61rem wide, over the@4xltier (56rem). A literalcontainerGridColsFor(4)would therefore draw four columns inxl, against acceptance 1 (「xl 弹窗里是 3 列」). The size cap is what makes the acceptance true.The count reaches all three dialog arms: the flat form (fed to
applyAutoLayoutthrough the explicit-columns route), the object'sfieldGroupsfallback (derived groups no longer stamp a fixedcolumns; the arm reads the form's declared count, else the dialog's), and authored sections (sectionedGridLayouttakes a new optional third argument,undeclared).Dialog-only, per the claim's corrected premise:
UNDECLARED_SECTION_COLUMNS, and the defaults ofsectionColumnsFor,sectionedFormColumnsandsectionedGridLayout, are unchanged. The three functions gained an optional trailingundeclaredparameter defaulting to that constant;ObjectForm,TabbedFormandWizardFormdo not pass it. None of the touched symbols is in the package's published entries (index.tsx,core.ts), so the public surface is byte-unchanged.Card items:
xlfor field-heavy forms: already true onmain, and unchanged. The size reads the declared grid or the floor of 2, never the count it then bounds, so there is no cycle. Proof: an undeclared grid is at least 2 either way, soinferModalSize(min(grid, inferColumns(n)))gives the same answer as before for every input.gridtake the whole row at every tier (pinned at 4 columns). Attachments (file/image) stay one cell in this PR. They are not in the sharedWIDE_FIELD_TYPES, and adding them there would also change page, drawer and detail layouts, which conflicts with 「不改整页表单的现有推断」. No code changes for them here. The seat is taking that question to the maintainer (claim amendment 6938698182).columnsis drawn as written: pinned for2and1, on the form and on a section.Maximize / full-page toggle is #34604. Acceptance 1's 「放大后是 4 列」 is shown under the existing authored
modalSize: 'full'.Before / after (sixteen undeclared fields, fields per row at
@md/@2xl/@4xl; below@mdalways 1)main(97defd6)xlmodalSize: 'full'columns: 2ObjectFormsectioned page, undeclaredTests
__tests__/dialogContainerColumns-34607.test.tsx(14 cases) covers acceptance 1 (xl, full, phone, wide kinds at 4), acceptance 2 (declared 2 and 1, a declared section beside an undeclared one), undeclared sections andfieldGroups, the light-form floor, and the page controls:ObjectFormsectioned and flat, plussectionedGridLayoutwith no third argument.dialogDefaultLayout-12521.test.tsx: its twelve-field fixture (inferColumnsgives 3) now draws the three-wide grid. Four expectations moved from the 2-wide grid and@md:col-span-2to the 3-wide grid and['@md:col-span-2', '@2xl:col-span-3']. The phone-column check now reads "every multi-column tier is a container query" in place of "every tier is@md". Size, authored-layout and light-form pins are unchanged.undeclaredSectionDensity-12592.test.tsx: in the page-host case "every section undeclared", the byte-equality with the dialog is replaced. The page still reads 2 / 2 / 2 (unchanged), and the dialog reference now reads 2 / 3 / 3. The lightMIXEDcase still matches the dialog byte for byte.mixedSectionColumns-12548,sectionColumns.test.tsx,modalFieldGroups.test.tsx,autoLayout.test.ts,modalViewportGutter-12593, and app-shellAppContent.recordDialogInterimBound-12521/AppContent.formViewModalSize-12803needed no change; all of them pass as they are.Readings
pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-form/:Test Files 234 passed (234)·Tests 2607 passed | 1 skipped (2608)· lockVERDICT command-exit 0AppContent.recordDialogInterimBound-12521,AppContent.formViewModalSize-12803):Test Files 2 passed (2)·Tests 21 passed (21)pnpm --filter @object-ui/plugin-form type-check(tsc --noEmit && tsc -p tsconfig.test.json):VERDICT command-exit 0scripts/ablation-replace.mjson committed HEAD: anchorconst cap = modalSize === 'full' ? 4 : 3;replaced byconst cap = 4;(anchor 1 to 0, blob6c11ba904537to0512e09117ac). ThendialogContainerColumns-34607:Tests 5 failed | 9 passed (14)(xl three-wide, declared-section beside undeclared, undeclared sections, fieldGroups, helper). Restored: blob equals HEAD,git diff HEADempty. The test file imports../ModalForm/../autoLayoutfrom source, so no dist leg applies.Fix round 1 readings (head 7ec78e2, README only)
dispatch-gates --commands --repo objectstack-ai/objectstack ui/packages/plugin-form/README.md: 19 families, every oneexit 0.--ranreconciliation:19 derived famil(ies) accounted for — 19 run, 0 NOT-MEASURED (a DERIVED zero …).pnpm check:new-line-citations:0 new citation(s), exit 0.overlap-checkbefore the push:VERDICT clean exit 0(origin/main 518baca, and feat(plugin-form): section navigation for stacked sectioned forms #34642 sharesModalForm.tsx; both merge cleanly).Acceptance notes
file/imagestay one cell in this PR, in the dialog and on the page alike. Making them wide in the sharedWIDE_FIELD_TYPESwould change page, drawer and detail layouts, which conflicts with 「不改整页表单的现有推断」. The seat is taking that question to the maintainer.ui/packages/plugin-form/README.md§ "Column width of a sectioned form" was stale: it said an undeclared sectioned form "is single-column". It now names the page hosts' default (2 per row) and the dialog's own undeclared count (2 to 3 by field count, 4 in afulldialog). It also says that a declaredcolumnsis drawn as written. The file was added to the surface by claim amendment 6938698182; this was fix round 1.columns: 2on many forms, so HotCRM shows no change until those declarations go. hotcrm is not touched.Verification
Local gates follow the
dispatch-gates --commandslist derived for this diff; readings are in the report comment. Browser check: NOT MEASURED (jsdom evaluates no container query). The tier claim rests on the class reading in the tests plus the 64rem − 3rem = 61rem ≥ 56rem arithmetic above.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs